<template>
  <div>
    <h1>refs</h1>
    <button @click="getValue">获取div中内容</button>
    <div id="box">你好</div>
    <div ref="box1">他好</div>
    <Child7 ref="child7"></Child7>
  </div>
</template>

<script>
import Child7 from '@/components/Child7.vue';
export default {
    components:{
        Child7
    },
    methods:{
        getValue(){
           // alert("123")
           alert(document.getElementById("box").innerHTML);
           alert(this.$refs.box1.innerHTML);
           alert(this.$refs.child7.$refs.msg.value);
        }  
    }

}
</script>

<style>

</style>